package com.example.steveaoblogdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.steveaoblogdemo.entity.Friend;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface FriendMapper extends BaseMapper<Friend> {
    @Insert("insert into friend (id,f_name,f_link) values (#{id},#{fName},#{fLink})")
    int addFriend(Integer id,String fName,String fLink);

    @Update("update friend set f_name=#{fName},f_link=#{fLink} where id=#{id}")
    int updateFriend(String fName,String fLink,Integer id);
}
